package com.azkj.album.view.activity

import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.FrameLayout
import com.azkj.album.R
import kotlinx.android.synthetic.main.layout_movie_view.view.movieNameView

class MovieView @JvmOverloads constructor(
    context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : FrameLayout(context, attrs, defStyleAttr) {
    init {
        LayoutInflater.from(context).inflate(R.layout.layout_movie_view, this)
    }

    fun setName(name: String) {
        movieNameView.text = name
    }

    fun getText(): String {
        return movieNameView.text.toString()
    }
}